//
//  WCCodeCountSheetController.m
//  WabbitCode
//
//  Created by William Towe on 4/6/09.
//  Copyright 2009 Revolution Software. All rights reserved.
//

#import "WCCodeCountSheetController.h"


@implementation WCCodeCountSheetController
- (void)dealloc {
	[_size release];
	[_minTime release];
	[_maxTime release];
	[super dealloc];
}
@synthesize maxTime=_maxTime,minTime=_minTime,size=_size;

+ (void)codeCountSheetWithSize:(NSString *)size minTime:(NSString *)minTime maxTime:(NSString *)maxTime; {
	WCCodeCountSheetController *controller = [[[self class] alloc] initWithWindowNibName:@"WCCodeCountSheet"];
	
	[controller setSize:size];
	[controller setMinTime:minTime];
	[controller setMaxTime:maxTime];
	
	[NSApp beginSheet:[controller window] modalForWindow:[NSApp keyWindow] modalDelegate:controller didEndSelector:@selector(_sheetDidEnd:code:info:) contextInfo:NULL];
}

- (void)_sheetDidEnd:(NSWindow *)sheet code:(NSInteger)code info:(void *)info {
	[self autorelease];
}
@end
